package com.lifeng.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lifeng on 2019/5/27.
 */
@RestController
public class UserController {
    private static final Logger log = LoggerFactory.getLogger(UserController.class);
    @NacosValue(value = "${my.version:1.0.0}", autoRefreshed = true)
    private String version;
    @NacosValue(value = "${my1.version:1.0.0}", autoRefreshed = true)
    private String version1;
    @NacosValue(value = "${my.owner}", autoRefreshed = true)
    private String owner;

    @RequestMapping("/info")
    public String getInfo(){
        log.info("my.version:"+version+",my.owner:"+owner);
        return "my.version:"+version+",my.owner:"+owner+",my1.version:"+version1;
    }
}
